﻿<%@ Page Title="" Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true"
    CodeFile="ShopSearchResult.aspx.cs" Inherits="Shopsearch_result" %>

<%@ Register Src="Components/SearchBox.ascx" TagName="SearchBox" TagPrefix="uc" %>
<%@ Register TagPrefix="uc" Namespace="Taopi.WebComponents" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        
    </style>
    <link href="Styles/searchCommon.css" rel="stylesheet" type="text/css" />
    <link href="Styles/ShopThumbnail.css" rel="Stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div id="searchBar">
        <uc:SearchBox ID="searchBox" runat="server" ClientIDMode="Static" />
    </div>
    <section id="titleArea">
        <h2>
            Search for Shop:
            <asp:Label ID="Label1" runat="server" Text="Label" /></h2>
    </section>
    <div id="searchResultArea">
        <asp:LinqDataSource ID="searchResultSource" runat="server" OnSelecting="searchResultSource_Selecting">
        </asp:LinqDataSource>
        <div id="filterArea">
            <fieldset>
                <legend>Categories</legend>
                <asp:CheckBoxList ID="shopCategoryList" runat="server" DataSourceID="searchResultSource"
                    DataTextField="Category" DataValueField="Category" AutoPostBack="True" RepeatLayout="Flow">
                </asp:CheckBoxList>
            </fieldset>
        </div>
        <div id="filterResultArea">
            <asp:LinqDataSource ID="filterResultSource" runat="server" OnSelecting="filterResultSource_Selecting" />
            <asp:ListView ID="ListView1" runat="server" DataSourceID="filterResultSource" ViewStateMode="Disabled">
                <LayoutTemplate>
                    <ul id="itemList">
                        <asp:PlaceHolder runat="server" ID="itemPlaceholder" />
                    </ul>
                </LayoutTemplate>
                <ItemTemplate>
                    <li>
                        <uc:ShopThumbnail ID="ShopThumbnail1" ShopName='<%# Eval("name") %>' ShopCategory='<%# Eval("category") %>'
                            CoverPhoto='<%# Eval("coverPhoto") %>' Owner='<%# Eval("owner") %>' runat="server" />
                    </li>
                </ItemTemplate>
            </asp:ListView>
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="3">
                <Fields>
                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                        ShowPreviousPageButton="False" />
                    <asp:NextPreviousPagerField ButtonType="Button" ShowNextPageButton="False" />
                    <asp:NumericPagerField />
                    <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowPreviousPageButton="False" />
                </Fields>
            </asp:DataPager>
        </div>
    </div>
</asp:Content>
